﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="CustomerOC.aspx.cs" Inherits="BEGDC.CC.Web.CIS2.Overseas.CustomerOC" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title></title>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <link href="../../css/global.css" rel="stylesheet" type="text/css" />
    <link href="../../css/main.css" rel="stylesheet" type="text/css" />
    <link href="../../css/main2.css" rel="stylesheet" type="text/css" />

    <script type='text/javascript' src='https://www.google.com/jsapi'></script>

    <style>
        .div-main
        {
            padding-top: 10px;
            float: left;
        }
    </style>

    <script type="text/javascript">
        google.load('visualization', '1', { packages: ['orgchart'] });
        google.setOnLoadCallback(drawChart);
        function drawChart() {
            var data = new google.visualization.DataTable();
            data.addColumn('string', 'Name');
            data.addColumn('string', 'Manager');
            data.addColumn('string', 'ToolTip');
            data.addRows(<%=ocShow %>);
            var chart = new google.visualization.OrgChart(document.getElementById('chart_div'));
            chart.draw(data, { allowHtml: true });
        }
    </script>

</head>
<body>
    <form id="form1" runat="server">
    <div id="info" class="sitemap">
        &nbsp;&raquo;&nbsp;Home(Overseas)&nbsp;&raquo;&nbsp;Customer OC
    </div>
    <br />
    <br />
    <div id="Div1" runat="server" class="div-main">
        Company:<asp:DropDownList ID="selectCompany" DataSourceID="edsCompany" DataValueField="CompanyID"
            DataTextField="Name" runat="server">
        </asp:DropDownList>
        <asp:Button ID="btnOK" Text="OK (确定)" runat="server" OnClick="btnOK_Click" CssClass="btn" />
    </div>
    <br />
    <div id='chart_div' class="div-main">
    </div>
    <asp:EntityDataSource ID="edsCompany" runat="server" ConnectionString="name=CCEntities"
        DefaultContainerName="CCEntities" EnableDelete="True" EnableInsert="True" EnableUpdate="True"
        EntitySetName="Companies" Where="!it.Disabled">
    </asp:EntityDataSource>
    </div>
    </form>
</body>
</html>
